<?php $form = $this->beginWidget('CActiveForm', array(
    'id'=>'catalog-form',
    'enableAjaxValidation'=>true,
    'enableClientValidation'=>true,
    'focus'=>array($model,'name'),
)); ?>

<div class="row-fluid">
	<div class="span12">
        <div class="widget">
            <div class="widget-header">
                <span class="title">Thêm chuyên mục sản phẩm</span>
            </div>
            <div class="widget-content form-container">
                <div class="control-group">
                    <?php echo $form->labelEx($model,'name',array('class' => 'control-label')); ?>
                    <div class="controls">
                        <?php echo $form->textField($model,'name',array('class' => 'span12')); ?>
                        <?php echo $form->error($model,'name',array()); ?>
                    </div>
                </div>
                <div class="control-group">
                    <?php echo $form->labelEx($model,'description',array('class' => 'control-label')); ?>
                    <div class="controls">
                        <?php echo $form->textarea($model,'description',array('class' => 'span12')); ?>
                        <?php echo $form->error($model,'description',array()); ?>
                    </div>
                </div>
               
                <div class="control-group">
                    <?php echo $form->labelEx($model,'root',array('class' => 'control-label')); ?>
                    <div class="controls">
                        <?php echo $form->dropDownList($model,'root',$model->loadRootCatalog(),array('class' => 'span12 chosen','data-placeholder' => 'Chọn chuyên mục cha')); ?>
                        <?php echo $form->error($model,'root'); ?>
                    </div>
                </div>
                
                <div class="form-actions">
                    <button type="submit" class="btn btn-primary">Save changes</button>
                    <button class="btn" type="reset">Cancel</button>
                </div>

            </div>
        </div>
    </div>
</div>
<?php $this->endWidget(); ?>
